<%= error_messages_for 'issue' %>

<!--[form:issue]-->
<p><label for="issue_project_key">Project key</label><br/>
<% @keys = Project.find(:all).map {|k| [k.key, k.key]} %>
<%= select(:issue, :project_key, @keys) %></p>

<p><label for="assigned_initials">Assigned</label><br/>
<% @initials = User.find(:all).map {|u| [u.initials, u.initials]} %>
<%= select(:issue, :assigned_initials, @initials) %></p>

<p><label for="issue_issue_type">Issue type</label><br/>
<% @types = IssueType.find(:all).map {|t| [t.name, t.name]} %>
<%= select(:issue, :issue_type, @types) %></p>

<p><label for="issue_component">Component</label><br/>
<% @components = Component.find(:all).map {|c| [c.name, c.name]} %>
<%= select(:issue, :component, @components) %></p>

<p><label for="issue_version">Version</label><br/>
<% @versions = Version.find(:all).map {|v| [v.name, v.name]} %>
<%= select(:issue, :version, @versions) %></p>

<p><label for="issue_title">Title</label><br/>
<%= text_field 'issue', 'title'  %></p>

<p><label for="issue_description">Description</label><br/>
<%= text_area 'issue', 'description'  %></p>

<p><label for="issue_create_date">Create date</label><br/>
<%= date_select 'issue', 'create_date'  %></p>

<p><label for="issue_update_date">Update date</label><br/>
<%= date_select 'issue', 'update_date'  %></p>

<p><label for="issue_due_date">Due date</label><br/>
<%= date_select 'issue', 'due_date'  %></p>

<p><label for="issue_complete_date">Complete date</label><br/>
<%= date_select 'issue', 'complete_date'  %></p>

<p><label for="issue_complete">Complete</label><br/>
<select id="issue_complete" name="issue[complete]"><option value="false">False</option><option value="true">True</option></select></p>

<p><label for="issue_status">Status</label><br/>
<% @statuses = IssueStatus.find(:all).map {|s| [s.status, s.status]} %>
<%= select(:issue, :status, @statuses) %></p>

<!--[eoform:issue]-->

